<template>

    用户名:<input type="text" v-model="MemberName"/>
状态:<select v-model="MemberState">
    <option :value="0">--请选择--</option>
    <option :value="1">启用</option>
    <option :value="2">禁用</option>
</select>

<input type="button" value="查询" @click="LoadData"/>




<table border="1">
    <thead>
        <tr>
        <td colspan="2" style=":text-align: center;"><h2>会员显示</h2></td>
    </tr>
        <tr>
            <td>用户名</td>
            <td>真实姓名</td>
            <td>手机号</td>
            <td>会员等级姓名</td>
            <td>状态</td>
            <td>操作</td>
        </tr>
    </thead>
    <tbody>
        <tr v-for="item in info ">
            <td>{{item.M_Name}}</td>
            <td>{{item.M_TrueName}}</td>
            <td>{{item.M_Phone}}</td>
            <td>{{item.MT_Name}}</td>
            <td>{{item.M_State==true?"启用":"禁用"}}</td>
            <td>操作</td>
        </tr>
    </tbody>
</table>

</template>



<script setup lang="ts">
import { onMounted ,ref} from 'vue';
import axios from 'axios';
const MemberName=ref("");
const MemberState=ref(0);

const info=ref([{

    M_Name:"",
    M_TrueName:"",
    M_Phone:"",
    M_State:true,
    MT_Name:"",

}])

onMounted(()=>{
    LoadData();
})

const LoadData=()=>{
axios.get('https://localhost:7083/api/Member/ShowMember',
{
    params:{
        Mname:MemberName.value,
        State:MemberState.value
    }
}
)
 .then(res=>{
   
        info.value=res.data;


 })

}

</script>